package com.heima.admin.controller.v1;

import com.heima.admin.service.adminUserLoginService;
import com.heima.model.apuser.dtos.AdUserDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rookie001
 * @creat 2023-06-19-9:44
 */
@RestController
@Slf4j
@RequestMapping("/login")
public class adminUserLoginController {
    @Autowired
    private adminUserLoginService adminUserLoginService;

    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto dto) {
        log.info("登录 信息 {}",dto);
        return adminUserLoginService.login(dto);
    }
}
